<?php
$operationUI = $control;
$operation = $operationUI->getNode();
$app = $operation->getCurrentApp();
$space = $app->getCurrentSpace();
$allowJoinRoles = $space->getAllowJoinSpaceRoles();
?>
<legend>Join to space</legend>
<?php foreach ($allowJoinRoles as $id => $role) {
    echo '';
    ?>
    <p><strong>Space:</strong><?php echo $space->getName(); ?></p>
    <p><strong>Application:</strong><?php echo $app->getName(); ?></p>
    <p><strong>Join role:</strong><?php echo $role->getName(); ?></p>
    <br>
<?php } ?>

